#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "Person.h"
#include "Student.h"
#include "Teacher.h"

using namespace std;

TEST(Klass, assign_leader_who_is_not_klass_member)
{
    Klass klass1(1);
    Klass klass2(2);
    Student jerry("1", "Jerry", 18, klass1);
    klass2.AssignLeader(jerry);
}

TEST(Klass, append_member_to_same_klass)
{
    Klass klass1(1);
    Student jerry("1", "Jerry", 18, klass1);
    EXPECT_THAT(klass1.HasMember(jerry), ::testing::Eq(true));

    klass1.AppendMember(jerry);

    EXPECT_THAT(klass1.HasMember(jerry), ::testing::Eq(true));
}

TEST(Klass, append_member_to_different_klass)
{
    Klass klass1(1);
    Klass klass2(2);
    Student jerry("1", "Jerry", 18, klass1);
    EXPECT_THAT(klass1.HasMember(jerry), ::testing::Eq(true));

    klass2.AppendMember(jerry);
    EXPECT_THAT(klass2.HasMember(jerry), ::testing::Eq(true));
}